﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="GetPrivateMessages.ascx.cs"
    Inherits="Controls_GetPrivateMessages" %>
<table cellpadding="0" cellspacing="0" style="width: 98%">
    <tr>
        <td>
            <span class="LargeGreenText">Inbox</span>
        </td>
    </tr>
    <tr>
        <td colspan="3" align="left">
            <asp:GridView ID="GridViewWallPosts" ItemStyle-VerticalAlign="Top" AutoGenerateColumns="False"
                GridLines="None" Width="100%" ShowHeader="False" runat="server" CellPadding="1"
                ForeColor="#333333" OnRowCommand="GridViewWallPosts_RowCommand" OnRowDataBound="GridViewWallPosts_RowDataBound"
                AllowPaging="True" OnPageIndexChanging="GridViewWallPosts_PageIndexChanging"
                PageSize="10">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HiddenField ID="hdnID" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"ID")%>' />
                            <table style="border-style: solid; border-width: thin; border-color: #E1E6D5; width: 100%">
                                <tr class="gridViewHead">
                                    <td align="left">
                                        <table cellpadding="2" cellspacing="0" class="formTableReport1">
                                            <tr>
                                                <td align="left" style="width: 50px" valign="top">
                                                    <a href='<%#getUserHREF(Container.DataItem)%>'>
                                                        <img align="middle" src='<%#getSRC(Container.DataItem)%>' border="1" style="border-color: Black"
                                                            width="50px" height="50px" /></a>
                                                </td>
                                                <td align="left" valign="top">
                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="left" class="SmallBlackTextBold" style="white-space: normal; vertical-align: top;
                                                                height: 40px">
                                                                <%#AutoConvertToHTML(Container.DataItem)%>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="bottom">
                                                                <nobr>
                                                            <%#GetReceiveIconHTML(Container.DataItem)%>
                                                                <span  class="XXSmallGreyText">Sent On: &nbsp;<%#DataBinder.Eval(Container.DataItem,"SendDate")%></span>
                                                                <%#GetSendIconHTML(Container.DataItem)%>
                                                                </nobr>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td align="right" valign="top">
                                                    <asp:ImageButton Visible="false" ID="imgDeleteMainPost" runat="server" ImageUrl="~/Images/DeleteIcon.png"
                                                        CommandName="DeleteMainPost" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <%--  DataSource="<%# ((Post)Container.DataItem).Comments %>"--%>
                                        <asp:GridView ID="rptUserDetails" runat="server" OnRowCommand="rptUserDetails_ItemCommand"
                                            OnRowDataBound="rptUserDetails_ItemDataBound" ItemStyle-VerticalAlign="Top" AutoGenerateColumns="False"
                                            GridLines="None" Width="100%" ShowHeader="False" runat="server" CellPadding="0"
                                            AllowPaging="True" OnPageIndexChanging="rptUserDetails_PageIndexChanging" PageSize="10">
                                            <Columns>
                                                <asp:TemplateField>
                                                    <ItemTemplate>
                                                        <table cellpadding="2" cellspacing="0" class="formTableReport3">
                                                            <tr class="gridView1" runat="server" id="itemRow">
                                                                <td style="width: 15px">
                                                                    &nbsp;
                                                                </td>
                                                                <td align="left" style="width: 30px" valign="top">
                                                                    <a href='<%#getUserHREFSecondLavel(Container.DataItem)%>'>
                                                                        <img align="middle" src='<%#getSRCSecondLavel(Container.DataItem)%>' border="1" width="30px"
                                                                            height="30px" style="border-color: #E1E6D5" /></a>
                                                                </td>
                                                                <td align="left" valign="top">
                                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td align="left" class="SmallBlackText" style="white-space: normal; vertical-align: top;
                                                                                height: 20px">
                                                                                <%#AutoConvertToHTML(Container.DataItem)%>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td valign="bottom">
                                                                                <span class="XXSmallGreyText">Replyed On: &nbsp;<%#DataBinder.Eval(Container.DataItem,"SendDate")%></span>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                                <td align="right" valign="top">
                                                                    <asp:ImageButton ID="imgDeletePost" runat="server" Visible="false" ImageUrl="~/Images/DeleteIcon.png"
                                                                        CommandName="DeletePost" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ID")%>' />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <PagerStyle CssClass="gridViewDetailsPager" HorizontalAlign="Right"></PagerStyle>
                                            <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPrevious" NextPageText="Next"
                                                PreviousPageText="Previous" Position="Bottom" />
                                        </asp:GridView>
                                    </td>
                                </tr>
                                <tr class="gridViewNoBorder">
                                    <td align="left">
                                        <table cellpadding="2" cellspacing="1" class="formTableReport4">
                                            <tr class="gridViewNoBorder">
                                                <td style="width: 15px">
                                                    &nbsp;
                                                </td>
                                                <td align="left">
                                                    <nobr>
                                                    <asp:TextBox CssClass="input" ID="txtReply" TextMode="MultiLine" runat="server"  width="100%" ></asp:TextBox>
                                                    <asp:RequiredFieldValidator runat="server" id="reqReply" ControlToValidate="txtReply" ErrorMessage="*" ></asp:RequiredFieldValidator>
                                                    </nobr>
                                                </td>
                                                <td align="left" valign="bottom" style="padding-left: 10px">
                                                    <asp:Button CssClass="submitGood" ID="btnReply" runat="server" Text="Reply" CommandName="Reply"
                                                        CausesValidation="true" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <div style="height: 10px">
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="gridViewHeadPager" HorizontalAlign="Right"></PagerStyle>
                <RowStyle BackColor="White" />
                <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPrevious" NextPageText="Next"
                    PreviousPageText="Previous" Position="Bottom" />
            </asp:GridView>
        </td>
    </tr>
</table>
